﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PBOffice.Models;
using PBOffice.DAL;

namespace PBOffice.BLL
{
    public class MessageManager
    {
        public List<Message> GetAllMessage()
        {
            return new MessageService().GetAllMessage();
        }
        public Message GetMessageById(int id)
        {
            return new MessageService().GetMessageById(id);
        }
        public List<Message> GetMessageByFromUserId(string fromUser)
        {
            return new MessageService().GetMessageByFromUserId(fromUser);
        }
        public void AddMessage(Message msg)
        {
            new MessageService().AddMessage(msg);
        }
        public void UpdateMessage(Message msg)
        {
            new MessageService().UpdateMessage(msg);
        }
        public int GetCountByFromUserId(string name)
        {
            return new MessageService().GetCountByFromUserId(name);
        }
        public void DeleteMessageByIdAndFromUserId(int id, string userId)
        {
            new MessageService().DeleteMessageByIdAndFromUserId(id, userId);
        }
    }
}
